<%-- 
    Document   : Request
    Created on : Jun 10, 2013, 7:42:58 PM
    Author     : Acer
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Using implicit objects</title>
    </head>
    <body>
        Hello, <b><%=request.getParameter("name")%></b><br/><br/>
        Your request details are<br/><br/>
        <table border="1">
            <tr><th>Name</th><th>Value</th></tr>
            <tr><td>Request Method</td>
                <td><%=request.getMethod()%></td></tr>

            <tr><td>Request URL</td>
                <td><%=request.getRequestURI()%></td></tr>
            <tr><td>Request Protocol</td>
                <td><%=request.getProtocol()%></td></tr>
            <tr><td>Browser</td>
                <td><%=request.getHeader("user-agent")%></td></tr>
        </table>

        <%
                    if (session.getAttribute("sessionVar") == null) {
                        session.setAttribute("sessionVar", new Integer(0));
                    }
        %>

        <table>
            <tr>
                <th align="left">Would you like to see use of remaining implicit objects?</th>
            </tr>
            <tr>
            <form name="form1" action="pageContext.jsp" method="POST">
                <td><input type="radio" name="Other" value="Yes"/>Yes</td>
                <td><input type="radio" name="Other" value="No"/>No</td>
                <tr><td><input type="submit" value="Submit"/></td></tr>
            </form>
            </tr>
        </table>

    </body>
</html>
